<?php
class ControllerCommonSetting extends Controller {
    public function index()
    {
        if(isset($this->request->get['url']))
        {
            $signPackage = $this->weixinjs->getClientSignPackage($this->request->get['url']);
        }
        else 
        {
            $signPackage = $this->weixinjs->getSignPackage();
        }
        
        $data['wx_appId'] = $signPackage["appId"];
        $data['wx_timestamp'] = $signPackage["timestamp"];
        $data['wx_nonceStr'] = $signPackage["nonceStr"];
        $data['wx_signature'] = $signPackage["signature"];
        
        $this->response->setDataResult(1,"",$data);
    }
}